import request from "@/utils/request";

// 查询仓储货物列表
export function listStock(query) {
  return request({
    url: "/system/stock/list",
    method: "get",
    params: query,
  });
}

// 查询仓储货物详细
export function getStock(stockId) {
  return request({
    url: "/system/stock/" + stockId,
    method: "get",
  });
}

// 新增仓储货物
export function addStock(data) {
  return request({
    url: "/system/stock",
    method: "post",
    data: data,
  });
}

// 修改仓储货物
export function updateStock(data) {
  return request({
    url: "/system/stock",
    method: "put",
    data: data,
  });
}

// 删除仓储货物
export function delStock(stockId) {
  return request({
    url: "/system/stock/" + stockId,
    method: "delete",
  });
}

export function InOrOut(data) {
  return request({
    url: "/system/stock/inAndOut",
    method: "post",
    data: data,
  });
}
